<div class="search-add-box">
    公告名称：<nz-input [nzPlaceHolder]="'请输入查询公告名称'" [(ngModel)]="searchValue" style="width: 200px;" [nzSize]="'large'"></nz-input>
    <button nz-button type="submit" class="mar-left" [nzType]="'primary'" [nzSize]="'large'" (click)="search()">查询</button>
    <button nz-button class="btn-right" (click)="modal('add', '')" [nzType]="'primary'" [nzSize]="'large'">
        <i class="anticon anticon-plus"></i><span>新建</span>
    </button>
</div>
<nz-table #nzTable2 [nzDataSource]="data" [nzPageSize]="10" (nzPageIndexChange)="_refreshStatus()" (nzPageSizeChange)="_refreshStatus()" [nzLoading]="_loading">
    <thead nz-thead>
    <tr>
        <th  nz-th><span>公告名称</span></th>
        <th  nz-th><span>公告内容</span></th>
        <th  nz-th><span>操作</span></th>
    </tr>
    </thead>
    <tbody nz-tbody>
    <tr nz-tbody-tr *ngFor="let data of nzTable2.data;let i = index">
        <td nz-td width="25%">{{data.Title}}</td>
        <td nz-td width="65%">{{data.content}}</td>
        <td nz-td width="10%">
            <span>
              <a (click)="info(contentTpl,data)">查看</a>
              <span nz-table-divider></span>
              <a (click)="modal ('update', data)">修改</a>
              <span nz-table-divider></span>
              <a (click)="showConfirm(data)">删除</a>
            </span>
        </td>
    </tr>
    </tbody>
</nz-table>
<nz-modal  [nzWrapClassName]="'vertical-center-modal'" [nzVisible]="modalVisible3" [nzTitle]="popTitle" [nzConfirmLoading]="loading" [nzContent]="modalContent3"
           (nzOnCancel)="modalVisible3=false" (nzOnOk)="save()" [nzOkText]="'确定'" [nzCancelText]="'取消'" >
    <ng-template #modalContent3>
        <form nz-form [nzType]="'horizontal'" [formGroup]="validateForm">
            <div nz-form-item class="d-flex d-flex-margin">
                <div nz-form-item-required class="til-box">公告名称：</div>
                <div nz-form-control class="flex-1" nzHasFeedback  [nzValidateStatus]="getFormControl('A_Title')">
                    <nz-input [(ngModel)]="Aname" formControlName="A_Title" name="description" [nzSize]="'large'" [nzPlaceHolder]="'请输入'" nzId="no"></nz-input>
                    <div nz-form-explain *ngIf="getFormControl('A_Title').dirty&&getFormControl('A_Title').hasError('required')">公告名称不能为空！</div>
                </div>
            </div>
            <div nz-form-item class="d-flex d-flex-margin">
                <div nz-form-item-required class="til-box">公告内容：</div>
                <div nz-form-control class="flex-1" nzHasFeedback  [nzValidateStatus]="getFormControl('A_Context')">
                    <nz-input [(ngModel)]="Adetail" formControlName="A_Context"  name="description" [nzType]="'textarea'" [nzSize]="'large'" [nzPlaceHolder]="'请输入'" nzId="no"></nz-input>
                    <div nz-form-explain *ngIf="getFormControl('A_Context').dirty&&getFormControl('A_Context').hasError('required')">公告内容不能为空！</div>
                </div>
            </div>
        </form>
    </ng-template>
</nz-modal>
<ng-template #contentTpl>
    <div nz-form-item class="d-flex d-flex-margin">
        <div nz-form-control class="flex-1">
            <div nz-form-label class="til-box ant-form-item-label">公告名称：</div>
            {{Aname}}
        </div>
    </div>
    <div nz-form-item class="d-flex d-flex-margin">
        <div nz-form-control class="flex-1">
            <div nz-form-label class="til-box ant-form-item-label">公告内容：</div>
            {{Adetail}}
        </div>
    </div>
</ng-template>

